SPWSER page# 0001 next
2: COMMENT ⊗   VALID 00008 PAGES
3: C REC  PAGE   DESCRIPTION
4: C00001 00001
5: C00002 00002    BEGIN SPWSER ↔   SUBTTL  SPACEWAR SERVICE
6: C00003 00003     ROUTINE TO KILL 2-PROCESSOR SPACE WAR FOR JOB N
7: C00006 00004     ENTER HERE FROM UUOCON TO SET UP A SPW JOB
8: C00010 00005     BASIC LEVEL SPW CLOCK AND RUN ROUTINES
9: C00013 00006     HERE, WE KNOW THIS JOB IS RUNABLE. NOW, IS IT TIME TO RUN?
10: C00017 00007     INTERRUPT LOCATIONS FOR BOTH PROCESSORS
11: C00021 00008     WE GET HERE ON ERROR IN SPW MODE JOB OR DISMISS
12: C00024 ENDMK
13: C⊗;
    SPWSER page# 0002 next  prev
15: BEGIN SPWSERSUBTTL  SPACEWAR SERVICE
16: ; JAM. STANFORD, 8-NOV-68
17: 
18: AP2CHL←CAT(P2CH,\APRCHN)
19: 
20: ; INITIALIZE ALL SPACEWAR TABLES
21: 
22: SPWINI:
23:         SETZM   SPWGO                   ; ZERO OUT P1 SPW TABLE
24:         MOVE    TAC,[XWD SPWGO,SPWGO+1]
25:         BLT     TAC,JBTST2+JOBN-1       ;CLEAR SPWGO,SP2GO,JBTST2
26: 
27:         SYNINI SPWCSC
28: 
29:         CONI    404,SPWBUT              ; SET UP SPW BUTTONS
30:         SETZM   SPWACT                  ; KILL SPW JOB COUNT
31:         SETZM   SPWUUF                  ;NOT AT SPACEWAR LEVEL ON EITHER PROCESSOR
32:         SETZM   SPWUUF+P2PID
33:         SETZM   SPWTMO                  ;AND INITIALLY, NO TIMEOUT ACTIVE
34:         SETZM   SPWTMO+P2PID
35:         POPJ    P,
    SPWSER page# 0003 next  prev
37: ; ROUTINE TO KILL 2-PROCESSOR SPACE WAR FOR JOB N
38: ; CALLING . . .
39: ;       MOVE    J,JOB           ; GET JOB NUMBER IN ITEM
40: ;       PUSHJ   P,KILSPW        ; KILLS SPACEWAR, SAVES AC'S
41: 
42: KILSPW:PUSH P,TAC
43:         MOVSI TAC,SPWSNB
44:         PUSHJ P,CLRSIN          ; CLEAR ANY SPACEWAR SWAPIN REQUEST
45:         POP P,TAC
46:         PUSH    P,TAC1
47:         PSYNC   SPWCSC          ; GET CONTROL OF SPW CELLS
48:         SKIPN   JBTST2(J)       ; IS A JOB ACTIVE HERE?
49:         JRST    KILSP1
50: IFN FTSTAT,<
51:         PUSH P,TAC
52:         MOVEI TAC,SPWSTA+7700
53:         PUSHJ P,STAPUT
54:         POP P,TAC
55: >;FTSTAT
56:         SKIPE   SPWGO(J)        ;DOES HE HAVE A P1 SPW JOB
57:         PUSHJ   P,P1REL         ;RELEASE SPW ON PDP 10
58:         SKIPE   SP2GO(J)        ;AND P2
59:         PUSHJ   P,P2REL         ;RELEASE SPW ON PDP 6
60:         SETZM   JBTST2(J)
61: KILSP1: XSYNC   SPWCSC
62:         POP     P,TAC1
63:         POPJ    P,
64: 
65: P1REL:  SETZ    TAC1,
66:         MOVE    TAC,TAC1
67:         LDB     TAC1,[POINT 6,SPWGO(TAC),5]
68:         CAME    TAC1,J
69:         JUMPN   TAC1,.-3
70:         JUMPE   TAC1,CPOPJ
71:         LDB     TAC1,[POINT 6,SPWGO(J),5]
72:         DPB     TAC1,[POINT 6,SPWGO(TAC),5]
73:         SETZM   SPWGO(J)
74:         SOS     SPWACT
75:         POPJ    P,
76: 
77: P2REL:  SETZ    TAC1,
78:         MOVE    TAC,TAC1
79:         LDB     TAC1,[POINT 6,SP2GO(TAC),5]
80:         CAME    TAC1,J
81:         JUMPN   TAC1,.-3
82:         JUMPE   TAC1,CPOPJ
83:         LDB     TAC1,[POINT 6,SP2GO(J),5]
84:         DPB     TAC1,[POINT 6,SP2GO(TAC),5]
85:         SETZM   SP2GO(J)
86:         SOS     SPWACT
87:         POPJ    P,
88: 
89: OFSPW:  PUSHJ   P,KILSPW                ;HERE IF HE GOOFS.
90:         JSP     TAC,UUOMES
91:         ASCIZ    /ATTEMPT TO INITIATE SPW JOB WITH ONE ALREADY RUNNING
92: UUO/
    SPWSER page# 0004 next  prev
94: ; ENTER HERE FROM UUOCON TO SET UP A SPW JOB
95: ; CALL FROM UUOCON:
96: ;       MOVE    UCHN,[MODE-BITS,,TICKS]
97: ;       MOVE    UUO,[ANYTHING,,STARTING ADDRESS]
98: 
99: SPWCON:
100:         MOVE    J,JOB(PID)              ; GET CURRENT JOB NUMBER
101:         MOVEI   TAC,(UUO)               ;GET STARTING ADDRESS
102:         JUMPN   UCHN,SPW0               ;ZERO TICKS?
103:         CAIN    TAC,'SSW'               ;STOP CODE?
104:         JRST    KILSPW                  ;YES, STOP SPACEWAR
105: SPW0:   CAIGE   TAC,140                 ;ABOVE JOB DATA AREA?
106:         JRST    UADRER                  ;GIVE HIM ADDRESS CHECK FOR STARTING ADR
107:         XCTR    XR,[MOVE TAC,(TAC)]     ;ADDRESS CHECK HIS STARTING ADDRESS
108:                                 ;HERE, P2 IS ALIVE.
109:         TLNN    UCHN,200000     ;REQUESTING PDP-6?
110:         JUMPL   UCHN,SPW1       ;NO, HOW ABOUT PDP-10?
111:         SKIPE   SP2GO(J)        ;IS THERE ALREADY A JOB RUNNING HERE?
112:         JRST    OFSPW           ;YES, HE GOOFED
113: SPW4H:  SKIPL   PALIVE+P2PID    ;IS THE PDP-6 REALLY THERE?
114:         JRST    SPW4G
115:         TLNN    UCHN,200000     ;WAS HE REALLY SURE ABOUT USING THE SIX?
116:         JRST    SPW1            ;NO, TRY THE TEN
117:         JUMPN   PID,SPW4G
118:         MOVEI   TAC,[ASCIZ /
119: HUNG DEVICE:    PDP-6
120: /]
121:         PUSHJ   P,HNGMES
122:         JRST    SPW4H
123: 
124: SPW4G:  AOS     SPWACT
125: IFN FTSTAT, <
126:         HRRZ TAC,UCHN
127:         LSH TAC,6
128:         TRO TAC,SPWSTA+4000     ;FLAG PDP-6
129:         PUSHJ P,STAPUT
130: >;FTSTAT
131:         PSYNC   SPWCSC          ; GET CONTROL OF JBTST2
132:         MOVSI   DAT,SPWRUN
133:         TLNE    UCHN,40000      ;SUPPRESS TIMEOUT?
134:         MOVSI   DAT,SPWRUN!SPWNT2       ;YES. SET TIMEOUT SUPRESSION BIT TOO
135:         IORM    DAT,JBTST2(J)   ; MARK US AS RUNNING
136:         TSO     UCHN,SP2GO      ; COPY FIRST LINK INTO UCHN (RIGHT)
137:         DPB     J,[POINT 6,SP2GO,5]     ;NEW FIRST LINK
138:         HRLM    UCHN,SP2GO(J)   ;DO THIS STUFF NOW TOO
139:         HRRM    UUO,SP2GO(J)
140:         XSYNC   SPWCSC          ; RELEASE CONTROL OF JBTST2
141:         JUMPGE  UCHN,CPOPJ      ;IS HE REQUESTING IT TO BE RUN ON THE PDP-10 ALSO?
142: 
143: SPW1:                           ;HERE FOR P1 SPACEWAR
144:         SKIPE   SPWGO(J)        ; IS THERE ALREADY A JOB THERE?
145:         JRST    OFSPW           ; YES, GO SHOOT HIM!
146:         AOS     SPWACT          ; WE HAVE ONE MORE SPW JOB NOW
147: IFN FTSTAT, <
148:         HRRZ TAC,UCHN
149:         LSH TAC,6
150:         TRO TAC,SPWSTA          ;FLAG PDP-10
151:         PUSHJ P,STAPUT
152: >;FTSTAT
153:         PSYNC   SPWCSC          ; GET CONTROL CELLS
154:         MOVSI   DAT,SPWRUN      ; INDICATE THAT A JOB IS RUNNING
155:         TLNE    UCHN,100000     ;P1 TIMEOUT SUPRESSION?
156:         MOVSI   DAT,SPWRUN!SPWNT1       ;YES. SET TIMEOUT SUPRESSION BIT
157:         IORM    DAT,JBTST2(J)   ; PUT IN 'RUNNING' BIT
158:         TSO     UCHN,SPWGO
159:         DPB     J,[POINT 6,SPWGO,5]
160:         HRLM    UCHN,SPWGO(J)   ; PUT JIFFIES IN LH
161:         HRRM    UUO,SPWGO(J)    ; PUT ADDRESS IN RH
162:         XSYNC   SPWCSC
163:         POPJ    P,
    SPWSER page# 0005 next  prev
165: ; BASIC LEVEL SPW CLOCK AND RUN ROUTINES
166: ; FIRST, ACCUMULATOR RE-DEFINITIONS
167: AC←DEVDAT
168: GO←DAT
169: A←DSER
170: B←UCHN
171: C←UUO
172: D←PROG
173: ; REGISTER AC CONTAINS THE ADDRESS OF THE PROCESSOR'S AC STORAGE TABLE
174: ; REGISTER GO CONTAINS SPWGO OR SP2GO, DEPENDING ON WHERE WE ARE
175: 
176: SPWP2: MOVEI   AC,SPWB         ; LOAD UP AC WITH P2 STORAGE TABLE ADDRGSS
177:         MOVEI   GO,SP2GO        ; AND P2 RUN TABLE
178:         JRST    SPWPP
179: 
180: SPWP1: MOVEI   AC,SPWA         ; AC STORAGE FOR P1
181:         MOVEI   GO,SPWGO        ; APPROPRIATE RUN TABLE
182: SPWPP:  PUSH    P,JOB(PID)      ;SAVE SO WE CAN RUN SPW UUOS.
183:         SETOM   SPWUUF(PID)     ; FLAG SPW LEVEL.
184:         HRLI    GO,J            ; INDEX SPWGO BY JOB NUMBER
185:         MOVEI   J,0             ; START AT FRONT
186: SPWPP3: PSYNC   SPWCSC
187:         LDB     J,[POINT 6,@GO,5]       ; LINK
188:         JUMPN   J,SPWPP2                ; DISPATCH IF NON-ZERO
189:         XSYNC   SPWCSC
190:         POP     P,JOB(PID)
191:         MOVE    J,JOB(PID)      ; PUT JOB NUMBER UP
192:         MOVE    A,JBTADR(J)     ; GET PROT-RELOC FOR JOB WE INTERRUPTED
193:         MOVEM   A,JOBADR(PID)   ;YES.
194:         HLRZM   A,USRREL(PID)
195:         SETZM   SPWUUF(PID)
196:         JUMPE   J,CPOPJ         ;DON'T RESTORE PROT-RELOC FOR JOB 0
197:         PUSHJ   P,GETPR         ;GET JOB'S PROT-RELOC
198:         DATAO   APR,TAC         ;SET PR
199:         POPJ    P,              ;END OF LOOP, GO HOME
200: 
201: SPWPP2: MOVE    D,@GO           ;GET LATEST COPY OF SPW WORD
202:         TRNE    D,-1            ;IS HE BEING FLUSHED?
203:         SKIPL   A,JBTST2(J)     ;IS THIS JOB RUNNABLE?
204:         JRST    SPWPP5          ;NO, EXIT NOW
205:         JUMPN   PID,SWPP2B      ;JUMP IF P2
206:         TLNN    A,SPWST1        ;IS HE SUSPENDED SOMEHOW?
207:         JRST    SPWPP4          ;NO, GO RUN HIM
208:         SKIPE   SP2GO(J)        ;IS HE RUNNING ON P2 TOO?
209:         JRST    SPWPP5          ;YES THEN LET ONLY P2 COUNT THE SUSPENSION.
210:         ADDI    A,1             ;INCREMENT THE SUSPENSION COUNT.
211: SWPP2A: HRRM    A,JBTST2(J)     ;STORE NEW SUSPENSION COUNT.
212:         JRST    SPWPP5          ;RELEASE CELLS AND CONTINUE SCAN.
213: 
214: SWPP2B: TLNN    A,SPWST2        ;SUSPENDED ON P2?
215:         JRST    SPWPP4          ;NO.RUN THIS ONE.
216:         AOJA    A,SWPP2A        ;COUNT THE SUSPENSION
217: 
218: SPWPP9: DPB     A,[POINT 4,D,13];UPDATE COUNT
219:         MOVEM   D,@GO           ;REPLACE IN CONTROL WORD
220: SPWPP5: XSYNC   SPWCSC
221:         JRST    SPWPP3
    SPWSER page# 0006 next  prev
223: ; HERE, WE KNOW THIS JOB IS RUNABLE. NOW, IS IT TIME TO RUN?
224: 
225: SPWPP4: LDB     A,[POINT 4,D,13]        ; PICK UP SPW COUNT
226:         LDB     B,[POINT 4,D,17]        ; PICK UP SPW TIME
227:         JUMPE   B,[JUMPN A,SPWPP9       ;ZERO TICKS HE HAS RUN ONCE.
228:                 AOJA    A,SPWPP0]       ;RUN HIM HIS ONE TIME.
229:         CAIGE   A,-1(B)                 ;WILL IT BE TIME WHEN WE INCREMENT A?
230:         AOJA    A,SPWPP9                ;NOT TIME YET. INCREMENT AND REPLACE.
231:         SETZ    A,                      ; YES, ZERO COUNT AND RUN JOB
232: SPWPP0: DPB     A,[POINT 4,D,13]
233:         MOVEM   D,@GO
234:         MOVE    B,JBTST2(J)     ; GET STATUS REGISTER
235:         HLLZS   JBTST2(J)       ; NOW ZERO ERROR DELAY COUNT
236:         TLNE    B,SPWSUS        ; SHOULD WE WARN HIM OF AN IMPENDING DELAY?
237:         JRST    SPWPP6          ; YES
238:         HRRZ    B,B             ; COUNT OF TICKS WHILE SUSPENDED.
239:         JRST    SPWPP8          ; RUN HIM.
240: SPWPP6: JUMPE   PID,.+2         ; COME HERE IF WE MUST GIVE A WARNING
241:         TLOA    B,SPWSU2        ;TURN ON SUSPENSION WARNING FLAG P2
242:         TLO     B,SPWSU1        ;TELL JOB A SUSPENSION IS INDICATED P1
243:         MOVEM   B,JBTST2(J)     ; REPLACE JOB STATUS
244:         MOVNI   B,1             ; PUT WARNING IN B
245: SPWPP8: MOVSI   A,SPWNT1        ;TIMEOUT SUPRESSION BIT (P1)
246:         JUMPE   PID,.+2
247:         MOVSI   A,SPWNT2        ;TIMEOUT SUPRESSION BIT(P2)
248:         TDNN    A,JBTST2(J)     ;SKIP IF TSB IS ON
249:         MOVEI   A,JIFSEC/2      ;TIMEOUT IS HALF A SECOND
250:         HRRZM   A,SPWTMO(PID)   ;STORE THE TIMEOUT WORD
251:         MOVE    A,[JRST 2,@UUO0]
252:         ADDI    A,(PID)
253:         MOVEM   A,SPWXCT(PID)   ;SET UP THE UUO EXIT INSTRUCTION
254:                                 ;WHICH IS CLOBBERED BY CH3 ON TIMEOUTS
255:         XSYNC   SPWCSC
256:         HRRZ    A,AC
257:         BLT     A,17(AC)        ; BLT THEM INTO SPWA OR SPWB
258:         SETZM   A(AC)           ; AND ZERO OUT ACCUMULATOR A IN CORE
259:         HRRZ    17,D            ; GET JOB STARTING ADDRESS
260:         HRLI    17,4000         ; PUT IN IOT USER MODE BIT
261:         PUSHJ   P,GETPR         ; GET HIS PR
262:         DATAO   APR,TAC
263:         MOVE    2,JBTADR(J)     ; GET HIS PROTECTION-RELOCATION
264:         TLZ     2,1777          ; ZERO OUT THESE BITS FOR PDP-10
265:         MOVE    1,SPWBUT        ; GET SPACEWAR BUTTONS FOR HIM
266: 
267:         MOVN    15,J            ;
268:         MOVSI   2,400000
269:         LSH     2,(15)
270:         JUMPN   PID,.+2
271:         DATAO   PI,2            ;TURN ON MI WITH JOB NUMBER.
272: 
273:         SETOM   STIME(J)        ;FLAG THAT CORE IMAGE HAS BEEN RUN (I.E. MODIFIED)
274:         MOVE    15,J            ; SAVE JOB NUMBER
275:         MOVE    2,JBTADR(J)     ; RESTORE TRUE PROT-REL
276:         MOVE    7,JOBRL2(PROG)  ; UPPER TOO
277:         MOVE    6,JBTSTS(J)
278:         MOVE    3,B             ; GET FLAG REGISTER
279:         MOVEI   4,1
280:         SKIPE   PID
281:         MOVEI   4,2
282:         SETZM   5
283:         SKIPN   P2NUM
284:         JRST    SIXDED
285:         JUMPN   PID,SIXTST
286:         SKIPGE  PALIVE+P2PID
287:         SETOM   5
288:         JRST    3,@17
289: SIXTST: SKIPGE  PALIVE+P1PID
290: SIXDED: SETOM   5
291:         JRST    3,@17
    SPWSER page# 0007 next  prev
293: ; INTERRUPT LOCATIONS FOR BOTH PROCESSORS
294: 
295: SPWINT:
296:         CONI    APR,A
297:         TRNE    A,ILM
298:         TLO     A,ILMSPW
299:         TRNE    A,NXM
300:         TLO     A,NXMSPW
301:         TRNE    A,POV
302:         TLO     A,POVSPW
303:         CONO    APR,531110+APRCHN       ; CLEAR ANY CONCEIVABLE ERROR
304:         HRR     A,APRCHL                ; GET LOCATION OF ERROR
305:         MOVEM   A,SPWA+A                ; SET INTO SAVED ACCUMULATOR
306:         MOVE    PID,[P1PID]
307:         JRST    10,SPWUUX               ; TREAT AS A UUO
308: 
309: SPWERR:
310:         MOVE    J,JOB(PID)
311:         MOVE    A,UUOPC(J)
312:         SKIPN   PID
313:         HRRZM   A,SPWA+A
314:         SKIPE   PID
315:         HRRZM   A,SPWB+A
316: SPWXIT:                ;COME HERE ON DISMIS UUO(SEE US BE SNEAKY)!
317:         MOVE    P,SPWA+P
318:         SKIPE   PID
319:         MOVE    P,SPWB+P
320:         AOBJP   P,.+1           ;GET OLD UUOPC (SAVED BY SPWUUO)
321:         POP     P,UUOPC(J)      ; RESTORE UUO-LEVEL PC WORD
322:         JRST    SPWUUX
323: 
324: SP2INT:
325:         CONI    APR,A
326:         TRNE    A,ILM
327:         TLO     A,ILMSPW
328:         TRNE    A,NXM
329:         TLO     A,NXMSPW
330:         TRNE    A,POV
331:         TLO     A,POVSPW
332:         TRNE    A,CNS
333:         TLO     A,CNSSPW
334:         CONO    APR,531110+APRCHN       ; CLEAR APR ERROR
335:         HRR     A,AP2CHL                ; GET LOCATION OF ERROR
336:         MOVEM   A,SPWB+A
337:         MOVE    PID,[P2PID]
338:         JRST    10,SPWUUX
339: 
340: SPWUUO:
341: ;THE FOLLOWING 2 INST. PREVENT UUO'S FROM SPACEWAR--RPH 12-26-71
342: ;       SKIPL   @UUOLOC(PID)
343: ;       JRST    SPWUUX
344:         JUMPN   PID,SPWUUX      ;NO UUO'S ON 6 GODDAMMIT!
345:         MOVE    J,J+SPWA        ;GET JOB NO. OF SPW JOB.
346:         SKIPE 17,UUOPTR(J)      ;MUST CHECK THIS HERE SO WE DON'T DO TESTS ON UUO
347:         JRST SPWUU3
348: SPWUU1: SKIPE   17,@UUOLOC(PID) ;STOP ON 0
349:         CAMN    17,[CALL]       ;OR CALL WITH 0 ADR
350:         JRST    SPWUUX
351:         HLRZ    17,17
352:         CAIN    17,(<JRST 4,>)  ;OR HALT
353:         JRST    SPWUUX
354: ;       SKIPE   PID
355: ;       MOVE    J,J+SPWB
356: SPWUU2: MOVEM   J,JOB(PID)      ;PUT WHERE UUOCON WILL SEE IT.
357:         MOVE    PROG,JBTADR(J)  ;ALSO RELOCATION.
358:         MOVEM   PROG,JOBADR(PID)
359:         HLRZM   PROG,USRREL(PID)
360:         MOVE    P,SPWA+P        ;GET A PDL FOR UUOCON.
361: ;       SKIPE   PID
362: ;       MOVE    P,SPWB+P
363:         PUSH    P,UUOPC(J)      ; AND SAVE THE OLD UUO PC WORD
364:         MOVE    DAT,UUO0(PID)   ; PICK UP RETURN
365:         MOVE    UUO,@UUOLOC(PID)        ; AND UUO ITSELF
366:         JRST    UUOSY1          ;LET UUOCON HANDLE IT.
367: 
368: SPWUU3: XCTR    XR,[SKIPN SPWBLK+1(17)] ;IF SIMULATOR IS ENABLED FOR SPACEWAR,
369:         XCTR    XR,[SKIPN SPWBLK+2(17)] ;WE'LL BYPASS THE DISMISSAL TESTS
370:         JRST    SPWUU1
371:         JRST    SPWUU2
372: 
373: SPTMOE:                                ;HERE IN EXEC MODE IN CH7 FOR TIME-OUT
374:         MOVEI   PID,0                   ;ASSUME PDP-10
375:         CONSO   APR,MAOFF               ;SKIP IF WE ARE THE PDP-10
376:         MOVEI   PID,P2PID               ;PDP-6
377:         MOVSI   A,ILLTMO                ;SET TIMEOUT BIT
378:         HRR     A,SPWBLO(PID)           ;LOOK AT HOW WE WERE SHOT DOWN
379:         SKIPE   PID
380:         MOVEM   A,SPWB+A                ;STORE EVIL BITS
381:         SKIPN   PID
382:         MOVEM   A,SPWA+A
383:         JRST    SPWUUX                  ;PRETEND UUO
    SPWSER page# 0008 next  prev
385: ; WE GET HERE ON ERROR IN SPW MODE JOB OR DISMISS
386: 
387: SPWUUX:
388:         MOVSI   17,SPWA         ; RESTORE P1 ACCUMULATORS
389:         SKIPE   PID
390:         MOVSI   17,SPWB         ; RESTORE P2 ACCUMULATORS
391:         BLT     17,17
392:         JUMPE   A,SPWUU0        ; NO ERRORS, SCAN FOR NEXT JOB.
393:         PSYNC   SPWCSC
394:         HLLZS   @GO             ; ERROR, KILL THIS JOB
395:         TLO     A,SPWERB        ; ADD ERROR BIT TO THOSE ALREADY THERE
396:         MOVEM   A,JBTST2(J)     ; MOVE IN ERROR BIT
397:         XSYNC   SPWCSC
398: SPWUU0: JRST    2,@[SPWPPB]
399: 
400: SPWPPB: PSYNC   SPWCSC
401:         SKIPN   @GO
402:         JRST    SPWPPC
403:         LDB     A,[POINT 4,@GO,17]      ;GET HIS TIME FIELD 
404:         JUMPN   A,SPWPPC
405:         JUMPN   PID,SPWPPD
406:         PUSHJ   P,P1REL                 ;ZERO TICKS. RELEASE P1 SPACEWAR
407:         SKIPE   SP2GO(J)
408:         JRST    SPWPPC
409:         JRST    SPWPPE
410: SPWPPD: PUSHJ   P,P2REL                 ;ZERO TICKS. RELEASE P2 SPACEWAR
411:         SKIPN   SPWGO(J)
412: SPWPPE: SETZM   JBTST2(J)               ;ZERO THIS IF NOT SPW ACTIVE ON OTHER P.
413: SPWPPC: MOVE    A,JBTST2(J)             ;PICK UP JOB STATUS
414:         JUMPN   PID,SPWPPF
415:         MOVSI   D,SPWST1                ;P1 SUSPEND BIT
416:         SKIPN   SP2GO(J)                ;IS THERE SPACEWAR ON P2 ALSO?
417:         MOVSI   D,SPWST1!SPWST2         ;NONE ON P2. GET BOTH PROC. SUSP BITS.
418:         TLZE    A,SPWSU1                ;HAS WARNING BEEN GIVEN?
419:         TDO     A,D                     ;YES, SUSPEND THIS JOB
420:         TLC     A,SPWST1!SPWST2         ;ARE BOTH NOW SUSPENDED?
421:         TLCN    A,SPWST1!SPWST2         ;
422:         TLZ     A,SPWSUS                ;BOTH NOW SUSPENDED, CLEAR SUSPENSION REQ.
423:         MOVEM   A,JBTST2(J)             ; AND REPLACE JOB STATUS
424:         XSYNC   SPWCSC
425:         JRST    SPWPP3
426: SPWPPF: MOVSI   D,SPWST2                ;P2 SUSPEND BIT.
427:         SKIPN   SPWGO(J)
428:         MOVSI   D,SPWST1!SPWST2
429:         TLZE    A,SPWSU2                ;HAS SUSPENSION WARNING BEEN GIVEN?
430:         TDO     A,D                     ;YES. SET SUSPENSION.
431:         TLC     A,SPWST1!SPWST2         ;ARE BOTH NOW SUSPENDED?
432:         TLCN    A,SPWST1!SPWST2         ;
433:         TLZ     A,SPWSUS                ;BOTH NOW SUSPENDED, CLEAR SUSPENSION REQ.
434:         MOVEM   A,JBTST2(J)             ;STORE JOB STATUS
435:         XSYNC   SPWCSC
436:         JRST    SPWPP3
437: BEND SPWSER
 EOF: SPWSER end-of-file. cnt=7